import { VirtualDOM } from '@/types/VirtualDOM'
import { MyElement, createElement } from '@/utils'

const doms: VirtualDOM = {
  tagName: 'div',
  props: { className: 'cat' },
  children: [
    {
      tagName: 'div',
      props: { className: 'goods-container' },
      children: [
        {
          tagName: 'div',
          props: { className: 'goods-nav' },
          children: ''
        },
        {
          tagName: 'div',
          props: { className: 'goods-list' },
          children: ''
        }
      ]
    },
    {
      tagName: 'div',
      props: { className: 'goods-footer' },
      children: [
        {
          tagName: 'div',
          props: { className: 'goods-footer-icon' },
          children: [
            {
              tagName: 'i',
              props: { className: 'footer-icon' },
              children: ''
            },
            {
              tagName: 'span',
              props: { className: 'footer-badge' },
              children: 0
            }
          ]
        },
        {
          tagName: 'div',
          props: { className: 'goods-footer-prise' },
          children: [
            {
              tagName: 'p',
              props: { className: 'prise-number' },
              children: '¥0.00'
            },
            {
              tagName: 'p',
              props: { className: 'prise-tip' },
              children: '配送费 ¥0.00'
            }
          ]
        },
        {
          tagName: 'p',
          props: { className: 'goods-footer-pay' },
          children: [
            {
              tagName: 'a',
              props: { className: 'pay' },
              children: '去结算'
            },
            {
              tagName: 'span',
              children: '还差 ¥0 元起送'
            }
          ]
        }
      ]
    }
  ]
}

const ele = createElement(doms)

export default new MyElement(...ele)._render()
